import { ReactNode } from 'react';

export interface MetaProps {
  keepAlive?: boolean;
  title: string;
  key?: string;
  isLink?: boolean;
  icon?: string | ReactNode;
  [k: string]: any;
}

export interface IRouteObj {
  children?: IRouteObj[];
  element?: ReactNode;
  index?: boolean;
  path?: string;
  exact?: boolean;
  hidden?: boolean;
  meta?: MetaProps;
}

export interface IFuncNavResponse {
  rightsIcon: string;
  rightsLink: string;
  cacheRoute: number;
  openMode: number;
  rightsLevel: number;
  rightsCode: string;
  rightsComponent: string;
  pid: number;
  remark: string;
  rightsName: string;
  sortNo: number;
  deleted: number;
  createTime: number;
  id: number;
}

export interface IFuncNavTree extends IFuncNavResponse {
  element: ReactNode;
  children?: IFuncNavTree[];
}
